import request from '@/utils/request'

//从配置中获取业务的地址
import { baseUrlConfig } from '@/config/config'
const basePath = baseUrlConfig.businessBaseUrl

// 分页查询
export const reqPage = (data: any) => {
  return request({
    url: basePath + '/rep/problem/find/page',
    method: 'post',
    data
  })
}

// 新增
export const addPro = (data: any) => {
  return request({
    url: basePath + '/rep/problem/append',
    method: 'post',
    data
  })
}
// 编辑
export const updatePro = (data: any) => {
  return request({
    url: basePath + '/rep/problem/update',
    method: 'post',
    data
  })
}
// 删除
export const deletePro = (data: any) => {
  return request({
    url: basePath + '/rep/problem/delete',
    method: 'POST',
    data
  })
}

//设备管理
export const reqtypeList = (data: any) => {
  return request({
    url: basePath + '/eqpt/type/find',
    method: 'post',
    data
  })
}
// 导出文件
export const downloadFile = (data: any) => {
  return request({
    url: basePath + '/rep/problem/export',
    method: 'post',
    responseType: 'blob',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}